Instruct MySQL users to set DATABASE_ENCODING to `utf8mb4`.

cf. GH-286

Akinori MUSHA 10 年之前
父节点
当前提交
3c3380d44a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      .env.example

+ 5 - 0
.env.example

@@ -26,6 +26,11 @@ DATABASE_PASSWORD=""
26 26
 #DATABASE_PORT=3306
27 27
 #DATABASE_SOCKET=/tmp/mysql.sock
28 28
 
29
+# MySQL only: If you are running a MySQL server >=5.5.3, you should
30
+# set DATABASE_ENCODING to utf8mb4 instead of utf8 so that the
31
+# database can hold 4-byte UTF-8 characters like emoji.
32
+#DATABASE_ENCODING=utf8mb4
33
+
29 34
 # ==== Additional required production settings ====
30 35
 
31 36
 # Configure Rails environment.  This should only be needed in production and may cause errors in development.